import req from '@/api/req';

export const getUsers = async (data?: any) => {
  return req({
    baseUrl: 'baseUrl1',
    method: 'GET',
    url: 'users',
    params: data,
  });
};

// 获取天气情况
export const getWeather = async (data: any) => {
  return req({
    baseUrl: 'weather',
    method: 'GET',
    url: `weather_mini?city=${data.city}`,
    // params:data
  });
};

export const getList = async () => {
  const data = [
    {
      key: '1',
      name: 'John Brown',
      age: 32,
      address: 'New York No. 1 Lake Park',
      tags: ['nice', 'developer'],
    },
    {
      key: '2',
      name: 'Jim Green',
      age: 42,
      address: 'London No. 1 Lake Park',
      tags: ['loser'],
    },
    {
      key: '3',
      name: 'Joe Black',
      age: 32,
      address: 'Sidney No. 1 Lake Park',
      tags: ['cool', 'teacher'],
    },
  ];
  return data;
};
